(function () {
    "use strict";

    angular.module('core').factory('ferramentasSistemaService', factory);
    factory.$inject = ['$http', '$q'];

    function factory($http, $q) {

        return {
            reloadNavegacao: function (args) {
            var deferred = $q.defer();
            $http.post('/config/reloadNavegacao', args)
                .success(function (data) { deferred.resolve(data); })
                .error(function (data, status, headers, config) { deferred.reject(data); });
            return deferred.promise;
        },
            reloadConfig: function (args) {
            var deferred = $q.defer();
            $http.post('/config/reloadConfig', args)
                .success(function (data) { deferred.resolve(data); })
                .error(function (data, status, headers, config) { deferred.reject(data); });
            return deferred.promise;
        },
            checkModulos: function (args) {
            var deferred = $q.defer();
            $http.post('/config/checkModulos', args)
                .success(function (data) { deferred.resolve(data); })
                .error(function (data, status, headers, config) { deferred.reject(data); });
            return deferred.promise;
        },
            resetApp: function (args) {
            var deferred = $q.defer();
            $http.post('/config/resetApp', args)
                .success(function (data) { deferred.resolve(data); })
                .error(function (data, status, headers, config) { deferred.reject(data); });
            return deferred.promise;
        },
        };
    }

})();
